﻿using MongoDB.Driver;
using Sustainalytics.Entities;
using System;
using System.Collections.Generic;
using System.Linq;

namespace Sustainalytics.ScreeningTool.Synchronization.Handlers.Governance
{
    public class GovernanceCompanyProfileHandler : IHandler<GovernanceCompanyProfile>
    {
        public ProjectionDefinition<GovernanceCompanyProfile> GetProjection(ProjectionDefinitionBuilder<GovernanceCompanyProfile> builder)
            => builder.Include(x => x.AnalystView);

        public IEnumerable<ExtraElement> GetExtraElements(GovernanceCompanyProfile entity) => new ExtraElementList
        {
            { "Corporate Governance Analyst view", entity.AnalystView }
        };
    }
}
